package variable

/*

def name = 'a single \'a\'string'

println name
println name.class

def thupleName = '''\
line one
line two
line three
'''
println thupleName
def doubleName = "this a common String"
println doubleName.class

name = "Qndroid"
println name.class
def sayHello = "Hello: ${name}"
println sayHello
println sayHello.class
*/

//def sum = "the sum of 2 and 3 equals ${2 + 3}" //可扩展做任意的表达式
//println sum
//def result = echo(sum)
//println result.class
//
//String echo(String message) {
//    return message
//}


/* ==================字符串的方法=================== */

//println str.center(9,"c")
//println str.padLeft(9, 'a')
//println str.padRight(9, 'b')



//
//def str2 = 'Hello'
//println str > str2
//println str[0]
//println str[0..4]
//println str - str2
//println str.minus(str2)


def str = "groovy Hello"
// 倒序输出
println str.reverse()
// 首字母大写
println str.capitalize()
//是否为数字类型字符串
println str.isNumber()










